omegatfandomcom-20200213-history
Sharing a project with OmegaT and Subversion
Article originally published on http://www.qabiria.com/en/resources/articles/286-condividere-progetto-omegat-subversion.html. The new "team project" feature in OmegaT allows several translators to work together on the same project the easy way. Starting with version 2.6.0 OmegaT, the free and open source assisted translation software, introduced a very interesting feature: two or more translators can work on a project at the same time without the need of external tools, and share glossary and translation memories almost in real time. Version control through Apache Subversion The collaborative translation offered by OmegaT is based on the functionality of "Version Control," widely used by software developers to maintain control of changes to the code of a program. There are several programs that implement version or revision control; two of the best known are Subversion and GIT, not surprisingly the ones supported by OmegaT. Who wants to learn more about Subversion can read a very complete book on http://svnbook.red-bean.com. The Apache Subversion software is installed on a server and allows you to host the source code of a program under development. The various programmers who participate to the project can connect to that server to add their code changes. At the end, Subversion creates a single version by "merging" the various modifications made by the contributors. Similarly, by loading an OmegaT translation project on a SVN server, it is possible to assign it to various translators who can work on it simultaneously. Some elementary notion of SVN terminology: a repository is the place where files are saved; checkout means creating a working copy from the repository to your local computer; commit means copying your changes from the local computer to the repository. How to share a project using SVN First of all, you need to run a SVN server. There are two options: either you install SVN on your own server or you use a hosted service. Googling "free svn hosting" you will find several sites that offer this service for free. The method presented here relies on the free SVN server (limited to 2 users) offered by ProjectLocker. Of course, while using an external service you must be aware of the possible implications in terms of confidentiality, since you are loading the original document on a server outside of your direct control. Alternatively, to avoid this issue you can set a private SVN server, for example if you already have an Apache server that includes the software in question (e.g. VisualSVN). In this case the configuration is slightly different and will be treated in detail in a future article. You can take a look at this procedure for Mac and this solution for Windows. To start with, we recommend to experiment with ProjectLocker or a similar service. Once you made available the SVN server, you must also locally install a SVN client, in order to manage the folders on your computer. For Windows we recommend TortoiseSVN, and for Mac you can use a few free scripts on the SourceForge website (Script Subversion), which can be downloaded and installed by following the instructions on http://svn-finder.sourceforge.net/screencast-usage.html, or the svnX client, available on http://code.google.com/p/svnx/. After this brief introduction, let's now see the hands-on, step-by-step procedure to share a complete OmegaT project among several translators. There are three logical steps: #creating the repository on the server; #importing the OmegaT project into the repository; #checking out the OmegaT project. The first step is the same for all operating systems and is usually done by the project manager, or by the translator in charge of the management. He or she creates a root folder on the SVN server that will contain all the OmegaT projects to share. This step is only performed once. The second part depends on the operating system and is used to import each OmegaT project into the main repository. This operation is also done by the project manager only. Depending on the SVN client and the operating system, procedures may be different from those shown here. Finally, the project checkout by each translator is handled by OmegaT itself and requires only one click after you open the program. This is the only step that needs to be performed by translators, if they're not in charge of project management. Creating the repository #Creating a new repository on ProjectLocker. ##Click New Project in the Projects tab of ProjectLocker. ##Type the name and description of the repository. ##Choose SVN. ##Click Create Project. ##In the Projects view, click Click To View. ##In the popup window select the URL that corresponds to Subversion (not Trac), copy it and paste it into a blank text document (you will need it later). #Assigning users to the repository: ##Click the name of the repository, and add one or more users (created earlier). You can also add a group. ##Click on Manage SVN Permissions (left panel). ##Add group (e.g. Translation). ##Click the name of the group. ##Add one or more users to the group. #For convenience, create a new folder on your computer, for example /Repositories/, but you can also use an existing folder. Importing the project (Mac) #Select the newly created folder and run the script SVN Checkout from the top right menu. #Paste the URL noted in step 1.f and click OK. #Choose the destination path (a new subfolder called /svn/ is created by default, but you can rename it or you can use an existing folder). #In the Terminal window that pops up, type, when prompted, the computer admin password, the ProjectLocker user name and the password. #Open OmegaT and create a new project in the /Repositories/svn/ folder (make sure the project-save.tmx file is there) #Select the newly created project folder and run the script SVN Add and confirm by clicking on OK. #Select the parent folder /Repositories/SVN/ and run the script SVN Commit to synchronize the contents of the folder and confirm by clicking on OK. Importing the project (Windows) #Open OmegaT and create a new project in a temporary folder. #Select the newly created folder, right-click and choose Import... from the context menu added by TortoiseSVN. This command adds the files to the repository folder you created earlier. #In the popup window, enter the ProjectLocker user name and password. TortoiseSVN remembers the entered data, so they are only required the first time. #Paste the URL noted in step 1.f and click OK, leaving the other parameters unchanged. You should add a note in the comments field, to facilitate traceability. #Warning! Please note that SVN imports all the files in the selected folder, but not the folder itself. If you use a single repository (as suggested in this tutorial), you must manually add the name of the project folder to the URL. E.g., if you are working on the project no. 1, add 2012_0001 to the URL of the main repository, obtaining https://free5.projectlocker.com/main-repo-name/svn/2012_0001 #You can delete the temporary folder, as the project will then be downloaded and managed using OmegaT. Checking out the project At this point, each translator who has been assigned a part of the job needs to start OmegaT and select Download team project... from the Project menu. In the popup window choose SVN, type the URL you copied earlier (full project number, i.e. https://free5.projectlocker.com/main-repo-name/svn/2012_0001 as in the example) and specify on which local folder you want to save the project. If authentication is required, enter the user name and password for the SVN server (ProjectLocker in the example). During the first connection to the SVN server all files created in the repository are downloaded locally. Warning! Up to version 2.6.1, only the project-save.tmx file, the one that contains the translated unit is versioned, i.e. synchronized. From version 2.6.1_2 the project glossary file is also versioned (the one created through the "Add glossary item" function, whose name is usually {project_name}-glossary.txt). That means that any changes to other files in the project, such as changes to segmentation or original files are not automatically detected by OmegaT. However, since the whole project is uploaded on the SVN server, you can always check out and manual synchronise using a SVN client (provided that OmegaT is not active during these operations, in order to avoid conflicts). During translation, each time you save the project, the project-save.tmx file containing all the changes is synchronized, merging all changes with those of other translators. Setting the auto-save every few minutes (2 or 3) you make sure to frequently synchronize your work with that of all others. The same applies to the glossary file. It is important to remark that if the project is not completed in a single session, during the next session it is not necessary to download the project again. You simply open the project which has been already downloaded. OmegaT detects that it is a team project and will automatically connect to the server. In the event of a connection error, close the project and reopen it. Compared to the procedure with Dropbox already mentioned in a previous article, using the "team project" feature has some clear advantages. Despite a little complexity in the initial configuration, with the "team project" feature you can organize working groups consisting of more than two translators. Moreover, in the spirit of OmegaT as a project, you only use open source tools (both Apache Subversion and Git are distributed under open source licenses) without relying on commercial software (such as Dropbox). Using the characteristics of the SVN server you can also provide your clients a read-only access to the folder containing the target files, thus facilitating the delivery of the project. It goes without mention that all these benefits are available to users completely for free. A quick comparison with the prices of server-based solutions for commercial competitors should be sufficient to understand the scope and importance of this new development in OmegaT. Anyone wishing to contribute to the project with a donation can do so easily through PayPal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UB6Y2BBF99LL